﻿@{
    ViewBag.Title = "login";
    ViewBag.Description = "";
    ViewBag.Keywords = "";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section script{
    <link type="text/css" href="/content/css/style.css" rel="stylesheet" media="all" />
    <script src="/scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="/scripts/library.js" type="text/javascript"></script>
    <script src="/scripts/plug.js" type="text/javascript"></script>
    <script type="text/javascript">
        var library = new library.Login();
        $(function () {
            library.BindValidator();
            new plug.AValidator().BuildValidate('loginform');
        });
        function Refalsh(sender) {
            library.Refalsh(sender);
        }
    </script>
}
<div class="content">
    <div class="content-left">
        <div class="content-close">
            <img src="/content/images/btn-img.jpg" /></div>
        <div class="content-img">
            <a href="info-1.html">
                <img src="/content/images/img-l.jpg" /></a></div>
    </div>
    <div class="content-right">
        <div class="content-img">
            <a href="info-1.html">
                <img src="/content/images/img-r.gif" /></a></div>
        <div class="content-close">
            <img src="/content/images/btn-img.jpg" /></div>
    </div>
    <div class="content-center">
        <div class="content-login">
            <div class="login-t">
                <img src="/content/images/login-top.jpg" /></div>
            <div class="login">
                <div class="login-tital">
                    <span>还没注册？</span><a href="/account/register">马上注册</a>
                </div>
                <div class="login-form">
                    <form id="loginform" action="/account/login" method="post">
                    <input type="hidden" name="token" />
                    @if (ViewBag.Error != null)
                    {
                    <div class="data">
                        <div style="color:Red; width:180px; padding-left:65px;">@ViewBag.Error</div>
                    </div>
                    }
                    <div class="data">
                        <span>用户名：</span><input class="data-input" av="{x:'$email',t:'errormsg',m:'请输入正确的email作为用户名'}" type="text" value="@ViewBag.Username" name="username" /></div>
                    <div class="data">
                        <span>密码：</span><input class="data-input setValidator"  av="{x:':\\w{6,12}',t:'errormsg',m:'密码6-12位'}" type="password" name="password" /></div>
                    <div class="data">
                        <span>验证码：</span><input class="data-input setValidator" av="{x:':\\w{4}',t:'errormsg',m:'验证码输入有误'}" style="width: 85px;" type="text" name="validator" />
                        <div id="codeimg"> </div></div>
                    <div style="color:Red; width:180px; padding-left:50px;" id="errormsg"></div>
                    <div class="data-sub">
                        <input type="submit" value="登录" /></div>
                        <a href="/account/misspassword">找回密码</a>
                    </form>
                </div>
            </div>
            <div class="login-b">
                <img src="/content/images/login-bottom.jpg" /></div>
        </div>
        <div class="clear">
        </div>
    </div>
</div>
